Skip to content

Instantly share code, notes, and snippets.

# get total requests by status code
awk '{print $9}' /var/log/nginx/access.log | sort | uniq -c | sort -rn
# get top requesters by IP
awk '{print $1}' /var/log/nginx/access.log | sort | uniq -c | sort -rn | head | awk -v OFS='\t' '{"host " $2 | getline ip; print $0, ip}'
# get top requesters by user agent
awk -F'"' '{print $6}' /var/log/nginx/access.log | sort | uniq -c | sort -rn | head
# get top requests by URL
@digitalknk
digitalknk / openclaw-guide.md
Last active February 8, 2026 08:16
Running OpenClaw Without Burning Money, Quotas, or Your Sanity

Running OpenClaw Without Burning Money, Quotas, or Your Sanity

TL;DR

OpenClaw is useful, but most of the pain people run into comes from letting one model do everything, chasing hype, or running expensive models in places that don't need them.

What worked for me was treating OpenClaw like infrastructure instead of a chatbot. Keep a cheap model as the coordinator, use agents for real work, be explicit about routing, and make memory and task state visible. Cheap models handle background work fine. Strong models are powerful when you call them intentionally instead of leaving them as defaults.

You don't need expensive hardware, and you don't need to host giant local models to get value out of this. Start small, get things stable before letting it run all the time, and avoid the hype train. If something feels broken, check the official docs and issues first. OpenClaw changes fast, and sometimes it really is just a bug.

A metatable in Lua defines various extraneous behaviors for a table when indexed, modified, interacted with, etc. They are Lua's core metaprogramming feature; most well known for being useful to emulate classes much like an OOP language.

Any table (and userdata) may be assigned a metatable. You can define a metatable for a table as such:

-- Our sample table
local tab = {}
-- Our metatable
local metatable = {
 -- This table is then what holds the metamethods or metafields
@nerdegem
nerdegem / glinet_overlay
Created August 20, 2023 20:29
Configuring a GL-iNet for Overlay
Taken from: https://forum.gl-inet.com/t/extroot-configuration/27421
These were the only commands that seemed to work:
I used these commands to configure it, it’s working fine so far, just want to check I won’t run into any issues down the line:
opkg update
opkg install block-mount kmod-fs-ext4 e2fsprogs
DEVICE="$(sed -n -e "/\s\/overlay\s.*$/s///p" /etc/mtab)"
uci -q delete fstab.rwm
@cemizm
cemizm / aqara_fp300.py
Last active February 8, 2026 08:10
Aqara FP300 Presence Sensor
# Docs / install guide (custom ZHA quirks + FP300 example):
# https://meshstack.de/post/home-assistant/zha-custom-quirks/
#
# Upstream PR: https://github.com/zigpy/zha-device-handlers/pull/4504
# Tracking issue: https://github.com/zigpy/zha-device-handlers/issues/4487
from __future__ import annotations
from dataclasses import dataclass
@advixity
advixity / Create a MacOS installer USB (on Windows).md
Last active February 8, 2026 08:05
A (relatively) simple guide to create a Bootable MacOS installer USB on Windows

Create a Bootable MacOS installer USB on Windows

Note! Before proceeding, please make sure that you have a USB flash drive at least 8GB in size. All data will be destroyed on this drive, so please back up your files.

Try this first!

Some awesome guy has made a repo for this exact thing https://github.com/LongQT-sea/macos-iso-builder

Flash resulting DMG with Rufus

@OmerFarukOruc
OmerFarukOruc / claude.md
Last active February 8, 2026 08:05
AI Agent Workflow Orchestration Guidelines

AI Coding Agent Guidelines (claude.md)

These rules define how an AI coding agent should plan, execute, verify, communicate, and recover when working in a real codebase. Optimize for correctness, minimalism, and developer experience.


Operating Principles (Non-Negotiable)

  • Correctness over cleverness: Prefer boring, readable solutions that are easy to maintain.
  • Smallest change that works: Minimize blast radius; don't refactor adjacent code unless it meaningfully reduces risk or complexity.
@mxmilkiib
mxmilkiib / INTEGRATION.md
Last active February 8, 2026 08:04
prompt: local AI dev process; 2 repos, one individual branches, other for merging n test build

Mixxx Integration Branch Configuration

Last updated: 2026-02-06 URL: https://gist.github.com/mxmilkiib/5fb35c401736efed47ad7d78268c80b6 RFC 2119

Overview

This document tracks Milkii's personal Mixxx development setup for the creation and testing of feature and bugfix branches. It is a living document and SHOULD be updated as the workflow evolves.

  • The goal is to maintain two Mixxx source instances: a main mixxx repo and a mixxx-dev repo.
@eylenburg
eylenburg / msoffice_in_linux.md
Last active February 8, 2026 08:00
Installing Microsoft Office in Linux

Step by step guide: How to install Microsoft Office in any Linux distribution

There are multiple options how to install MS Office on Linux.

VM-based - Integrate Windows apps running in a Windows virtual machine as native-looking in Linux

  1. LinOffice - Microsoft Office Launcher for Linux, my own fork of Winapps which is focused on only running Microsoft Office, with some Office-specific improvements over Winapps and a fully automated setup. Eventually I would like to create a GUI for it. Decribed below
  2. Winapps, based on KVM, QEMU, Docker/Podman and FreeRDP. Still actively maintained (getting Github commits). Decribed below
  3. Cassowary, based on KVM, QEMU, libvirt/virt-manager, and FreeRDP. Last release in Feb 2022 and seems to be abandoned.